/*
 * Copyright 2010-2012 Susanta Tewari. <freecode4susant@users.sourceforge.net>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package coalescent.netbeans.jobs1;

import cef.command.Command;
import cef.pui.EventConstructionException;
import coalescent.cef.command.RunBackwardRecursionCommand;
import coalescent.cef.command.listener.RunBackwardRecursionCommandListener;
import coalescent.cef.pui.RunBackwardRecursionEventImpl;
import coalescent.nb.jobs.properties.CoalescentComboPropertys;
import commons.nb.jobs.Job;

/**
 * @author Susanta Tewari
 * @since Jun 4, 2011
 */
public class KC64RunRecursionJob extends Job<RunBackwardRecursionEventImpl> {

    public KC64RunRecursionJob() {

        setName("Infinite-Alleles Model");
        setDisplayName("Infinite-Alleles (KC64)");
        setDisplayName("Infinite-Alleles (KC64)");
        addComboProperty(CoalescentComboPropertys.StringKC64Data_Recursion());
        addComboProperty(CoalescentComboPropertys.RECURSION_COMPUTATIONS());
        addCommandOutputListener(new RunBackwardRecursionCommandListener());
    }

    @Override
    public boolean isCancellable() {
        return RunBackwardRecursionCommand.isCancellable();
    }

    @Override
    protected RunBackwardRecursionEventImpl createEvent() throws EventConstructionException {
        return new RunBackwardRecursionEventImpl(getProperties());
    }

    @Override
    public Class<RunBackwardRecursionEventImpl> getEventImplType() {
        return RunBackwardRecursionEventImpl.class;
    }

    @Override
    protected Command createCommand(RunBackwardRecursionEventImpl event) {
        return new RunBackwardRecursionCommand(event);
    }
}
